#coding:utf-8
import base64
import urllib.parse
import sys
import string


def add(s):
    n = base64.b64encode(s)
    print('加密成功！')
    print('加密后为：'+n)
    return n
# base64解密方法
def remove_base64(n):
    s1 = base64.b64decode(n)
    print('第一次解密成功!')
    # print('解密后：'+s1)
    print('解密后：', s1)
    return s1
# burlib-unquote解密方法
def remove_urlib(s1):
    # s2=unquote(s1)
    s12 = str(s1, 'utf-8')
    s2 = urllib.parse.unquote(s12)
    print('第二次解密成功！')
    # print('解密后：'+s2)
    print('解密后：', s2)
    return s2
# 对字符串进行分割
def split(s2):
      b = s2.split(',')[0:]
      for x in b:
          x = x.split(':')
          print(x)
def fun():
    # n = raw_input('请输入要解密的字符串：')
    n = input('请输入要解密的字符串：')
    while(n == -1):
        break
    s1 = remove_base64(n)
    s2 = remove_urlib(s1)
    split(s2)
if __name__ == '__main__':
    while(1):
        fun()